1. Field of the Invention
The present invention relates to a recognition technology of color document images.
2. Description of the Related Art
A document image recognizing apparatus executes an encoding process by recognizing characters in a document image when the document image is inputted. Recently a product to which a binary document image can be inputted has been developed. Recently the use of an image filing device has been widespread, and demand for recognizing an image which is filed by such a device when the image is inputted to a document image recognizing apparatus, has been increasing. A color document image recognizing apparatus also targets the recognition of color document images and gray scale document images.
As personal computers are widespread and information communications networks have improved, many electronically filed documents have appeared. However, the major medium of information distribution is still paper documents, and there are many existing paper documents. Under these circumstances, demand for a document image recognizing apparatus which can convert a paper document into an electronically filed document and edit the conversion result, has been increasing. In particular, since many gray scale documents and color documents contain pictures, demand for an apparatus such that can recognize not only binary documents, but also gray scale documents and color documents, has been increasing.
If an input document image is not a binary image, but a gray scale image or color image, a conventional color document recognizing apparatus binary-codes the lightness element of each pixel using a constant threshold, obtains a binary image with one of two kinds of values, that is, a value indicating that each pixel is located in a plotting area, such as a ruled line, stroke of a character/drawing, etc., and a value indicating that each pixel is located in a background area, and performs document recognition based on the obtained binary image.
FIG. 1 shows the configuration of a conventional color document image recognizing apparatus.
If an input document image 2201 is a color image, a gray scale image extracting unit 2202 outputs a gray scale image by extracting the gray scale value of a lightness element, etc., for each pixel.
When a gray scale image is inputted, a constant threshold binary-coding unit 2203 obtains a binary image by executing a binary-coding process for the inputted gray scale image using a constant threshold. This threshold is designated and inputted from the outside, or is obtained by computing the pixel value of a gray scale image, such as Otsu's binary-coded threshold (see Journal of the Institute of Electronic Information and Communication J63-D, No. 4 (1980), 349–356).
A local binary-coding unit 2204 obtains a binary image representing a finer plotting area by obtaining and binary-coding the variable threshold of each pixel in the plotting area of the binary image which is outputted by the constant threshold binary-coding unit 2203 using the pixel value of an area several times as large as a character stroke or of about half the size.
A binary image recognizing unit 2205 recognizes the binary image and outputs a recognition result 2206.
The object of the local binary-coding unit 2204 is to judge the binary image which is obtained from a lightness image using a single threshold, such as Otsu's binary-coded threshold, and to be the roughly obtained plotting area of the inputted color document image and to obtain a finer plotting area by performing finer binary-coding for each pixel of the rough plotting area using a variable threshold. A simpler configuration can also be considered and which is not provided with a local binary-coding unit 2204 and in which the binary image outputted by the constant threshold binary-coding unit 2203 is inputted to the binary image recognizing unit 2205 without modification.
However, the conventional color document image recognizing apparatus shown in FIG. 1 has a weak point in that if there are two or more background colors or plotting colors of a document in an input color document, or if gradation is applied to a background color or plotting color, a part of the plotting area of the input color document becomes a background area or a part of the background area becomes a plotting area in the generated binary image, and thus recognition accuracy is reduced.
The conventional color document image recognizing apparatus is characterized by binary-coding a gray scale image with the constant threshold binary-coding unit 2203 using a constant threshold and utilizing a binary image in which the plotting area of the input color document is roughly extracted in a subsequent process. For this reason, if there are two or more background colors or plotting colors of a document in an input color document, or if gradation is applied to a background color or plotting color, the relationship between the size of the pixel value of the background area and the pixel value of the plotting area of the gray scale image is not always constant. Therefore, if the gray scale image is binary-coded using a single threshold, a part of the plotting area of the input color document becomes a background area or a part of the background area becomes a plotting area in the generated binary image.
If binary-coding using a constant threshold is not performed and local binary-coding is performed for all the pixels of a gray scale image, a different threshold is used for each pixel, and if the entire neighborhood has almost the same background color or plotting color, noise in the gray-white-flecked state occurs in which the background color and plotting color are finely mixed. For this reason, binary-coding using a constant threshold is introduced in a preceding stage to limit a target to be locally binary-coded to the neighborhood of a plotting area and to prevent the gray-white-flecked noise from occurring, which becomes the cause of the problem described above.